/*
 * Interestingness.h
 *
 *  Created on: Jan 15, 2011
 *      Author: LyonsDesktop
 */

#ifndef INTERESTINGNESS_H_
#define INTERESTINGNESS_H_

#include "../../../Datasets/Dataset.h"

namespace CLEVER {
namespace RegionDiscovery {
namespace Fitness {
namespace Additive {
//! Abstract base class for interestingness functions
template<typename T>
class Interestingness
{
public:
	//! Calculates the interestingness of the given dataset, optionally using indexing or split datasets.
	virtual double Fitness(CLEVER::Datasets::Dataset<T> * rData, CLEVER::Datasets::NumericDataset * repSet, int UseIndex = -1, int IndexVal = -1) = 0;

	virtual double Fitness(CLEVER::Datasets::DoubleArrayDataset * rData, CLEVER::Datasets::NumericDataset * repSet, int UseIndex = -1, int IndexVal = -1) = 0;

	virtual double Fitness(std::vector<double> & rData, CLEVER::Datasets::NumericDataset * gData, CLEVER::Datasets::NumericDataset * repSet, int UseIndex = -1, int IndexVal = -1) = 0;

	//! Precomputers parameters within the function, optionally splitting the dataset if not using indexing.
	virtual void Precompute(CLEVER::Datasets::Dataset<T> * rData) = 0;

	virtual void Precompute(std::vector<double> & rData)
	{

	}


};
}
}
}
}
#endif /* INTERESTINGNESS_H_ */
